package com.longe.controller;

import com.longe.service.AccountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BankOneController {

    @Autowired
    private AccountInfoService accountInfoService;

    //张三转账
    @GetMapping(value = "/transfer/{amount}")
    public String transfer(@PathVariable Double amount){
        accountInfoService.updateAccountBalance("1", amount);
        return "bank1: " + amount;
    }
}
